package nl.moviefan.site.repository;

import java.util.List;
import nl.moviefan.site.model.Customer;
import nl.moviefan.site.model.MoviefanUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;

/**
 * Repository for Customers which is an interface. This repo extends from JpaRepository. 
 * JpaRepository will implement the crud operations. 
 */

public interface  CustomerRepository extends JpaRepository<Customer, Long> {
	List<Customer> findByLastname(@Param("lastname") String lastname);  
        
        Customer findByMoviefanUser(MoviefanUser moviefanUser); 
        
}
